package enumandlambda;

/**
 * @author shkstart
 * 创建线程并直接初始化
 * @create 2022-11-28-13:53
 */
public class ThreadDemo7 {
    public static void main(String[] args) {
        Thread thread = new Thread(){
            @Override
            public void run() {
                Thread t= Thread.currentThread();
                System.out.println(t.getName());
            }
        };
        thread.start();
    }
}
